package com.lyb.android.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.lyb.client.R;

/**
 * edit tool activity.
 * @author logic
 *
 */
public class PersonalCommonEditActivity extends BaseActivity{
    private static String TAG ="PersonalCommonEditActivity";
    
    private EditText commonEdit;
    
    private int type;
    
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_personal_edit);
		
		int type = this.getIntent().getIntExtra("_edit_father", 0);
		initViews();
		bindEvents();
	}

	private void bindEvents() {
		
	}

	private void initViews() {
		 Button btn_back = (Button) findViewById(R.id.author_blog_button_back)	;
		    btn_back.setOnClickListener(new View.OnClickListener(){
				@Override
				public void onClick(View v) {
					ExitActivity();
				}});
		    
		    Button btn_ok = (Button) findViewById(R.id.author_blog_button_registerOk)	;
		    btn_ok.setOnClickListener(new View.OnClickListener(){
		    	@Override
		    	public void onClick(View v) {
		    		ExitActivity();
		    	}});
		    
		    commonEdit = (EditText) findViewById(R.id.personal_edit)	;
		    
	}
	
	
	private void ExitActivity(){
		Intent intent = new Intent();
		intent.putExtra("_date", commonEdit.getText().toString().trim());
		this.setResult(Activity.RESULT_OK, getIntent());
		this.finish();
	}
}
